<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>本地存储localStorage</title>
</head>
<body>
    <script>
        // 1.存储
        localStorage.setItem('age',18)
        
        // 2.获取 读取 
        console.log(localStorage.getItem('age',18)) // 18
        console.log(typeof localStorage.getItem('age',18)) // string

        // 3.删除数据
        // localStorage.removeItem('age')
        localStorage.removeItem('car')
        

    </script>
</body>
</html>